//
//  LZCommonWebViewController.m
//  laziz_Merchant
//
//  Created by xbnzd on 17/1/5.
//  Copyright © 2017年 XBN. All rights reserved.
//

#import "LZCommonWebViewController.h"
#import "LZLanguageManager.h"

extern NSString *customer;
static NSString *const kServiceURL = @"/dist/user-agreement.html";
static NSString *const kAboutUsURL = @"/dist/user-aboutus.html";



@interface LZCommonWebViewController ()
@property (weak, nonatomic) IBOutlet UIWebView *webView;

@end

@implementation LZCommonWebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    switch (self.webCode) {
        case kWebState_aboutUs:{
            
            self.title = LZLocalizedString(@"setting_about_us", nil);
            self.umLogPageViewName = @"关于我们页面";
            
            [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@%@",APIBaseURL,customer,kAboutUsURL]]]];
        }
            break;

        case kWebState_service:{
            self.title = LZLocalizedString(@"terms_of_service", nil);
            self.umLogPageViewName = @"服务协议页面";
            
            [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@%@",APIBaseURL,customer,kServiceURL]]]];
        }
            break;
        default:
            break;
    }

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
